﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Services;
using MVCMongo.Filters;
using WindowsLive;
namespace MVCMongo.Controllers
{
    public class ContactController : Controller
    {
        const string Offers = "Contacts.View";
        const string AuthCookie = "delauthtoken";
        static WindowsLiveLogin wll = new WindowsLiveLogin(true);
        protected WindowsLiveLogin.ConsentToken Token;
        protected string ConsentUrl=wll.GetConsentUrl(Offers);

        public ContactController()
        {
       
          //  Session["wll"] = wll;
        }
        //
        // GET: /Contact/
        [WebMethod]
        public  string YahooAPI()
        {
            GetYahooContacts yahoo = new GetYahooContacts();
            // HttpContext.Current.Session["yahoo"] = yahoo;  

            var test = ConfigurationManager.AppSettings["ReturnUrl"];
            return yahoo.authorization(test);

        }
            public string GetHotmailContacts()
            
      
        {
           
            return wll.GetConsentUrl(Offers);
        }
       

    }
}
